package com.czkt.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.czkt.entity.Storage;
import com.czkt.entity.vo.StorageProduct;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author jobob
 * @since 2024-06-18
 */
@Mapper
public interface StorageMapper extends BaseMapper<Storage> {

    @Select("select * from storage s inner join crm.product p on p.prod_id = s.stk_prod_id where s.stk_warehouse like concat('%',#{stkWarehouse},'%')  and p.prod_name like concat('%',#{prodName},'%')")
    IPage<StorageProduct> selectStorageAndProduct(IPage<StorageProduct> storageProductIPage,@Param("stkWarehouse") String stkWarehouse,@Param("prodName") String prodName);
}
